#include <stdio.h>
#include <unistd.h>
int main()
{
  char arr[101] = {' '};
  const char* flag = "-\\|/";
  for(int i = 0; i < 100; i++)
  {
    arr[i] = '=';
    printf("[%-100s][%d%%][%c]\r", arr, i+1, flag[i%4]);
    fflush(stdout);
    usleep(10000);
  }
  printf("\n");
  return 0;
}
